
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>1.1 安装JDK · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="1.2.html" />
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    第一章 Hadoop环境搭建
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.2.1" data-path="1.1.html">
            
                <a href="1.1.html">
            
                    
                    1.1 安装JDK
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="1.2.html">
            
                <a href="1.2.html">
            
                    
                    1.2 Hadoop伪分布式安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="1.3.html">
            
                <a href="1.3.html">
            
                    
                    1.3 完全分布式环境搭建
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    第二章 Hadoop高可用
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../chapter2/HadoopHA原理.html">
            
                <a href="../chapter2/HadoopHA原理.html">
            
                    
                    2.1 HadoopHA原理与机制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../chapter2/HadoopHA搭建规划.html">
            
                <a href="../chapter2/HadoopHA搭建规划.html">
            
                    
                    2.2 HadoopHA搭建规划 
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../chapter2/Zookeeper介绍.html">
            
                <a href="../chapter2/Zookeeper介绍.html">
            
                    
                    2.3 Zookeeper介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../chapter2/Zookeeper搭建.html">
            
                <a href="../chapter2/Zookeeper搭建.html">
            
                    
                    2.4 Zookeeper配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../chapter2/HadoopHA配置.html">
            
                <a href="../chapter2/HadoopHA配置.html">
            
                    
                    2.5 HadoopHA配置
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    第三章 动态增删节点与常见配置
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../chapter3/3.1集群节点动态增删.html">
            
                <a href="../chapter3/3.1集群节点动态增删.html">
            
                    
                    3.1 集群节点的动态增删
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../chapter3/3.2常见错误与常用配置.html">
            
                <a href="../chapter3/3.2常见错误与常用配置.html">
            
                    
                    3.2 常见错误与常用配置
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >1.1 安装JDK</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="javajdk&#x5B89;&#x88C5;">JavaJDK&#x5B89;&#x88C5;</h2>
<h4 id="&#x4E0B;&#x8F7D;jdk">&#x4E0B;&#x8F7D;JDK</h4>
<p>&#x53BB;Oracle&#x7684;&#x5B98;&#x7F51;&#x4E0B;&#x8F7D;JDK&#xFF1A;<a href="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html" target="_blank">http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html</a></p>
<p><img src="https://upload-images.jianshu.io/upload_images/7013389-90663fc235854733.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="QQ&#x622A;&#x56FE;20180508201502.png"></p>
<p>&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x5148;&#x4E0B;&#x8F7D;&#x5230;&#x672C;&#x5730;&#xFF0C;&#x7136;&#x540E;&#x4ECE;Windows&#x4E2D;&#x5C06;&#x6587;&#x4EF6;&#x4F20;&#x5165;&#x5230;&#x865A;&#x62DF;&#x673A;&#x4E2D;&#x3002;
&#x4E5F;&#x53EF;&#x4EE5;&#x590D;&#x5236;&#x94FE;&#x63A5;&#x5730;&#x5740;&#xFF0C;&#x5728;Linux&#x7CFB;&#x7EDF;&#x4E2D;&#x4E0B;&#x8F7D;&#xFF0C;&#x4E0D;&#x8FC7;&#x590D;&#x5236;&#x94FE;&#x63A5;&#x5730;&#x5740;&#x4E0D;&#x80FD;&#x76F4;&#x63A5;&#x4E0B;&#x8F7D;&#xFF0C;&#x56E0;&#x4E3A;Oracle&#x505A;&#x4E86;&#x9650;&#x5236;&#xFF0C;&#x5730;&#x5740;&#x540E;&#x7F00;&#x9700;&#x8981;&#x52A0;&#x4E0A;&#x5B83;&#x968F;&#x673A;&#x751F;&#x6210;&#x7684;&#x968F;&#x673A;&#x7801;&#xFF0C;&#x624D;&#x80FD;&#x4E0B;&#x8F7D;&#x5230;&#x8D44;&#x6E90;&#x3002;</p>
<p><img src="https://upload-images.jianshu.io/upload_images/7013389-4f6abacbb9b5a889.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="image.png"></p>
<p>&#x53EF;&#x4EE5;&#x70B9;&#x51FB;&#x4E0B;&#x8F7D;&#xFF0C;&#x7136;&#x540E;&#x6682;&#x505C;&#xFF0C;&#x6700;&#x540E;&#x5728;&#x4E0B;&#x8F7D;&#x7BA1;&#x7406;&#x4E2D;&#x590D;&#x5236;&#x94FE;&#x63A5;&#x5730;&#x5740;&#x5C31;&#x53EF;&#x4EE5;&#x5728;Linux&#x7CFB;&#x7EDF;&#x4E2D;&#x4E0B;&#x8F7D;&#x5566;&#x3002;</p>
<p><img src="https://upload-images.jianshu.io/upload_images/7013389-4d11964c3bbf77e7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="image.png"></p>
<h4 id="&#x89E3;&#x538B;">&#x89E3;&#x538B;</h4>
<p>&#x9996;&#x5148;&#x5728;&#x53F3;&#x4FA7;&#x547D;&#x4EE4;&#x884C;&#x4E2D;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;<code>/app</code>&#x6587;&#x4EF6;&#x5939;&#xFF0C;&#x4E4B;&#x540E;&#x7684;&#x8F6F;&#x4EF6;&#x5C06;&#x5B89;&#x88C5;&#x5728;&#x8BE5;&#x76EE;&#x5F55;&#x4E0B;&#x3002;
&#x547D;&#x4EE4;&#xFF1A;<code>mkdir /app</code></p>
<p>&#x73B0;&#x5728;&#x6211;&#x4EEC;&#x89E3;&#x538B;JDK&#x5E76;&#x5C06;&#x5176;&#x79FB;&#x52A8;&#x5230;<code>/app</code>&#x76EE;&#x5F55;&#x4E0B;&#x3002;</p>
<pre><code>tar -zxvf jdk-8u171-linux-x64.tar.gz
mv jdk1.8.0_171/ /app
</code></pre><p>&#x53EF;&#x4EE5;&#x5207;&#x6362;&#x5230;<code>/app</code>&#x76EE;&#x5F55;&#x4E0B;&#x67E5;&#x770B;&#x89E3;&#x538B;&#x597D;&#x7684;&#x6587;&#x4EF6;&#x5939;&#x3002;</p>
<h4 id="&#x914D;&#x7F6E;&#x73AF;&#x5883;&#x53D8;&#x91CF;">&#x914D;&#x7F6E;&#x73AF;&#x5883;&#x53D8;&#x91CF;</h4>
<p>&#x89E3;&#x538B;&#x597D;JDK&#x4E4B;&#x540E;&#x8FD8;&#x9700;&#x8981;&#x5728;&#x73AF;&#x5883;&#x53D8;&#x91CF;&#x4E2D;&#x914D;&#x7F6E;JDK&#xFF0C;&#x624D;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#xFF0C;&#x63A5;&#x4E0B;&#x6765;&#x5C31;&#x6765;&#x914D;&#x7F6E;JDK&#x3002;
&#x8F93;&#x5165;&#x547D;&#x4EE4;&#xFF1A;<code>vim /etc/profile</code> &#x7F16;&#x8F91;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#xFF1B;</p>
<p>&#x5728;&#x6587;&#x4EF6;&#x672B;&#x5C3E;&#x8F93;&#x5165;&#x5982;&#x4E0B;&#x4EE3;&#x7801;&#xFF08;&#x4E0D;&#x53EF;&#x4EE5;&#x6709;&#x7A7A;&#x683C;&#xFF09;&#xFF1A;</p>
<p><img src="https://www.educoder.net/attachments/download/206710" alt=""></p>
<p>&#x7136;&#x540E;&#xFF0C;&#x4FDD;&#x5B58;&#x5E76;&#x9000;&#x51FA;&#x3002;</p>
<p>&#x6700;&#x540E;&#xFF1A;<code>source /etc/profile</code>&#x4F7F;&#x521A;&#x521A;&#x7684;&#x914D;&#x7F6E;&#x751F;&#x6548;&#x3002;</p>
<h4 id="&#x6D4B;&#x8BD5;">&#x6D4B;&#x8BD5;</h4>
<p>&#x6700;&#x540E;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x6D4B;&#x8BD5;&#x4E00;&#x4E0B;&#x73AF;&#x5883;&#x53D8;&#x91CF;&#x662F;&#x5426;&#x914D;&#x7F6E;&#x6210;&#x529F;&#x3002;
&#x8F93;&#x5165;&#xFF1A;<code>java -version</code> &#x51FA;&#x73B0;&#x5982;&#x4E0B;&#x754C;&#x9762;&#x4EE3;&#x8868;&#x914D;&#x7F6E;&#x6210;&#x529F;&#x3002;</p>
<p><img src="https://www.educoder.net/attachments/download/204870" alt=""></p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                
                <a href="1.2.html" class="navigation navigation-next navigation-unique" aria-label="Next page: 1.2 Hadoop伪分布式安装">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"1.1 安装JDK","level":"1.2.1","depth":2,"next":{"title":"1.2 Hadoop伪分布式安装","level":"1.2.2","depth":2,"path":"chapter1/1.2.md","ref":"chapter1/1.2.md","articles":[]},"previous":{"title":"第一章 Hadoop环境搭建","level":"1.2","depth":1,"ref":"","articles":[{"title":"1.1 安装JDK","level":"1.2.1","depth":2,"path":"chapter1/1.1.md","ref":"chapter1/1.1.md","articles":[]},{"title":"1.2 Hadoop伪分布式安装","level":"1.2.2","depth":2,"path":"chapter1/1.2.md","ref":"chapter1/1.2.md","articles":[]},{"title":"1.3 完全分布式环境搭建","level":"1.2.3","depth":2,"path":"chapter1/1.3.md","ref":"chapter1/1.3.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"chapter1/1.1.md","mtime":"2019-05-06T12:24:23.060Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-05-06T16:09:52.649Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

